<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
 session_start();
 include("../main/function.php");
 include("../main/ShowPage.class.php");
 include("../main/islogin.php");
 $db=new Db();
 
 $areauser_id=$_GET['areauser_id'];
 //判断事件
 $action=$_GET['action'];
 if('a'==$action){
    $db->query("update area_user set state='0' WHERE id=$areauser_id");
 	echo '<script>alert("禁用成功");history.back()</script>';
 }else if('b'==$action){
    $db->query("update area_user set state='1' WHERE id=$areauser_id");
 	echo '<script>alert("启用成功");history.back()</script>';
 }else{
 	$db->query("DELETE FROM area_user WHERE id=$areauser_id");
 	echo '<script>alert("账户删除成功！");history.back()</script>';
 }  
 
?>